<?php


// Use custom admin header/footer

pref('[Loop]/views/pathToSnippetHeader.html', '/Html/Snippet.Header.html');
pref('[Loop]/views/pathToSnippetFooter.html', '/Html/Snippet.Footer.html');


// Dependencies

require_once(PATH_APPLICATION . 'Model/CAccount.php');
require_once(PATH_APPLICATION . 'Model/CPostStatus.php');

$payload = json_decode(fv('payload', true), true);


$account = new Snsfg\CAccount();

$account->loadAccount('wechatAppId', $payload['appId'], SOCIAL_NETWORK_WECHAT);

$groups = $account->getGroups($payload['appId'], $payload['ef_universe_id'], SOCIAL_NETWORK_WECHAT);

v('groups', $groups);
?>